package cc.verywell.pureblock.msg.nfs;

import java.io.Closeable;
import java.util.Collection;
import java.util.List;

import cc.verywell.pureblock.func.node.KeyShell;
import cc.verywell.pureblock.func.node.NodeBucket.ValueShell;
import cc.verywell.pureblock.net.NormalSession;

/**
* 
* Copyright © 2019 TanYaqiu. All rights reserved.
* @author TanYaqiu 
* @address flat 601
* @date 2019年4月25日 下午8:31:33
*/
public interface NfsListener extends Closeable {

	void fireStoreFile(NormalSession nc, List<byte[]> fileHash);
	void fireMissFile(NormalSession nc, KeyShell fileHash);
	boolean fireTakeFileSuccess(NormalSession nc, KeyShell fileHash);
	void fireTakeFileFaild(NormalSession nc, KeyShell fileHash);
	boolean fireWantFile(NormalSession nc, byte[] fileHash);
	boolean fireSeekFile(NormalSession nc, List<byte[]> fileHash);
	void fireNewFileStored(NormalSession nc, KeyShell fileHash, byte[] payload);
	
	void fireNewNodeKey(Collection<ValueShell> values);
	void fireNewSession(NormalSession nc);
	void fireCloseSession(NormalSession nc);
	void close();

	
	
}
